From: Florian Müllner Date: Wed, 26 Jun 2019 17:16:41 +0000 (+0200) Subject: dialog: Use GObject.set() over Object.assign() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~845^2^2~122 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=68e580e394f734e54bcd67410f984a360fa56e72;p=gnome-shell.git dialog: Use GObject.set() over Object.assign() gjs has provided that as a more idiomatic replacement for a while. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/600 --- diff --git a/js/ui/dialog.js b/js/ui/dialog.js index 553b81c78..af057e631 100644 --- a/js/ui/dialog.js +++ b/js/ui/dialog.js @@ -214,7 +214,10 @@ var MessageDialogContent = GObject.registerClass({ } set icon(icon) { - Object.assign(this._icon, { gicon: icon, visible: icon != null }); + this._icon.set({ + gicon: icon, + visible: icon != null + }); this.notify('icon'); } @@ -231,7 +234,10 @@ var MessageDialogContent = GObject.registerClass({ } _setLabel(label, prop, value) { - Object.assign(label, { text: value || '', visible: value != null }); + label.set({ + text: value || '', + visible: value != null + }); this.notify(prop); }